package com.zxq.frame.fangyan;

import com.zxq.factory.annotate.DecoderField;
import com.zxq.factory.annotate.EncoderField;
import com.zxq.factory.annotate.Frame;
import com.zxq.factory.enums.EField;
import com.zxq.factory.enums.ETrimMethod;
import lombok.Data;

@Frame(remark = "数据交互得frame，需要有seq，ack,data三个要素")
@Data
public class FangYanDataFrame {


    @EncoderField(sequence = 1,note = "序列号")
    @DecoderField(sequence = 1,note = "序列号")
    Integer seq;

    @EncoderField(sequence = 2,note = "确认域")
    @DecoderField(sequence = 2,note = "确认域")
    Integer ack;

    @EncoderField(sequence = 3,field = EField.Bytes,note = "数据域")
    @DecoderField(sequence = 3,field = EField.Bytes,method = ETrimMethod.Tail,param = 0,note = "数据域")
    byte[] data;


}
